package com.eclab.springbootgo.model;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * User类
 *
 * @author Aiden <a href="mailto:adam602260@gmail.com"/>
 * @version User.java v0.1
 * @create 2019-08-27 13:35
 */
@Data
@Entity
@Table(name = "user")
@AllArgsConstructor
@NoArgsConstructor
public class User implements Serializable {

    private static final long serialVersionUID = -3629784071225214583L;

    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    private Integer id;

    @Column(name = "username", unique = true, nullable = false, length = 64)
    private String username;

    @Column(name = "password", length = 64)
    private String password;

    @Column(name = "brithday", length = 6)
    private Date brithday;

}
